<template>
    <section class="form-common">
  			<el-form :inline="true" :model="formInline" class="demo-form-inline">
			  	<el-form-item  v-for="(item,index) in formLabel"
					:label="item.label"
					:key="index"
					>
			  		<el-select v-if="item.type==='select'" 
					  	v-model="formInline[item.model]" 
						:placeholder="item.placeholder">
			         	<el-option v-for="(optionItem,optionIndex) in item.options" 
						 	:label="optionItem.name" 
							:value="optionItem.id"
							:key="optionIndex">
						</el-option>
			    	</el-select>
					<el-input v-if="item.type==='input'"  
						v-model="formInline[item.model]" 
						:placeholder="item.placeholder">
						<el-button slot="append" 
							icon="el-icon-search" 
							@click="$emit('search',formInline)" >
						</el-button>         
					</el-input> 
					<el-button type="primary" 
						v-if="item.type==='button'" 
						@click="$emit(item.method,formInline)"
						v-hasPermission="'add'"
						>
						{{item.placeholder}}
					</el-button>
					<el-button type="primary" 
						v-if="item.type==='button2'" 
						@click="$emit(item.method,formInline)"
						>
						{{item.placeholder}}
					</el-button>
				</el-form-item>
			</el-form>
    </section>
</template>

<script>
    
    export default {
    	props:{
    		formLabel:Array,
    	},
        data() {
          return {
          	formInline:{},
          };
        },
        methods: {
        	add(){
        	}
        }
  };
</script>

<style scoped="scoped">
    
</style>